package br.com.sipsoft.svola.entidades;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import lombok.Getter;
import lombok.Setter;

@Entity
@Table(name="TBMANAD_K050")		 
public class ManadK050 extends BaseEntity {
	
	@Id
	@Column(name="MANADK050_ID")
	@SequenceGenerator(name="MANADK050_SEQ", allocationSize = 1)
	@GeneratedValue(strategy=GenerationType.SEQUENCE)
	private @Getter @Setter Long id;
	
		
	@ManyToOne
	@JoinColumn(name="TIPO_REGISTRO_ID")
	private @Getter @Setter ManadTipoRegistro manadTipoRegistro;
	
	
	@Column(name="CNPJ")
	private @Getter @Setter String cnpj;
	
	@Column(name="DATA_ATUALIZ")
	private @Getter @Setter Date dataAtualizacao;
	
	@Column(name="COD_REG_TRAB")
	private @Getter @Setter String codigoRegistroTrabalhador;
	
	@Column(name="CPF")
	private @Getter @Setter String cpf;
	
	@Column(name="NIT")
	private @Getter @Setter String numeroIdentificarTrabalhador;
	
	@Column(name="COD_CATEG")
	private @Getter @Setter String codigoCategoriaTrabalhador;
	
	@Column(name="NOME_TRAB")
	private @Getter @Setter String nomeTrabalhador;
	
	@Column(name="DT_NASC")
	private @Getter @Setter Date dataNascimento;
	
	@Column(name="DT_ADMISSAO")
	private @Getter @Setter Date dataAdmissao;
	
	@Column(name="DT_DEMISSAO")
	private @Getter @Setter Date dataDemissao;
	
	@Column(name="IND_VINC")
	private @Getter @Setter Long indicadorTipoVinculo;
	
	@Column(name="TIPO_ATO_NOM")
	private @Getter @Setter Long tipoNomeacao;
	
	@Column(name="NM_ATO_NOM")
	private @Getter @Setter String numeroAtoNomeacao;
	
	@Column(name="DT_ATO_NOM")
	private @Getter @Setter Date dataAtoNomeacao ;
	
	@Override
	public void save() throws Exception {
		hibernateUtils.saveWithoutSession(this);
	}
	
	
}
